<template>
<view>
<template name="default">
  <view class="goods-price pd-bg-fff">
    <view class="co-red" v-if="data.goods.exchange_integral>0">
      <text>{{select.activity.priceName}}</text> ￥{{exchange_integral_price}} + {{data.goods.exchange_integral}}积分
    </view>
    <view class="co-red co-red-price" v-else>
      <view class="money-icon">￥</view> 
      <view class="sbj" style="line-height:52rpx">{{select.price[0]}}</view>
      <view class="money-icon">.{{select.price[1]}}</view>
    </view>
    <view class="market-price" v-if="select.activity.prom_type && select.activity.prom_type != 6">
      市场价:
      <view>￥{{select.activity.market_price}}</view>
    </view>
    <view class="market-price" v-else>
        <view>
             市场价
             <text style="text-decoration:line-through"> ￥{{data.goods.market_price}}</text>
        </view>   
       <!--  <view>
            销量 :
            <text> {{data.goods.sales_sum+data.goods.virtual_sales_sum}}</text>
        </view>
        <view>
             库存 :
             <text> {{data.goods.store_count}}</text>
        </view>        -->
    </view>
  </view>
  <view class="prom-info" v-if="select.activity.prom_type && select.activity.prom_type != 6 && isSeparate">
    <text class="prom-type">{{select.activity.countName}}</text>
    <text style="float:right;" class="prom-type">{{select.activity.countTime}}</text>
  </view>
  <view style="width:300rpx;padding-bottom:8rpx;margin-left:30rpx;" class="flex">
    <view class="co-red flex" style="margin-right:10px;line-height:100%;" v-if="data.goods.give_integral > 0">
      赠送<view>{{data.goods.give_integral}}</view>积分</view>

    <view class="goods-num" v-if="select.activity.prom_type!=2">
    </view>
  </view>
<!-- 广告 -->
<view v-if="data.goods.goods_config.ad_code" class="ad-goods user-comment">
  <image mode="widthfix" class="spec-img" :src="url+data.goods.goods_config.ad_code"></image>
</view>
    <view style="width:710rpx;padding:0 20rpx;border-top:16rpx solid #F5F5F5;border-bottom:2rpx solid #f3f3f3;" class="logistics-item" @tap="getCardList" v-if="cardList.length > 0 && data.goods.prom_type != 4">
      <view class="item-title ellipsis-1">优惠券</view>
        <view class="promotion-item-mes-card">
            <view v-for="(item, index) in cardList" :key="index" :for-key="index" v-if="index < 2">
            <text class="promotion-item-mes-cardborder">满{{item.condition}}减{{item.money}}</text>           </view>
      </view>
      <view class="item-img">
        <image class="wh100" src="/static/images/icon-arrowdown.png"></image>
      </view>
    </view>


  <view class="logistics-list pd-bg-fff">
    <view style="width:730rpx" class="logistics-item" v-if="select.activity.prom_type == 8 && select.activity.bargain_list.length > 0">
      <view style="width:270rpx">邀请好友去砍价吧~</view>
      <view class="item-mes bargin_headpic">
        <block v-for="(item, index) in select.activity.bargain_list" :key="index">
          <image class="bargin_head_pic" :src="item.head_pic"></image>
        </block>
      </view>
      <view class style="word-break:normal;width:160rpx;">{{activityIn||0}}人参与</view>
    </view>
 
    <view v-if="data.prom_order && data.goods.prom_type != 4" class="logistics-item" style="height:auto;align-items:stretch;padding:30rpx 0 0 0;">
      <view class="item-title ellipsis-1">活动</view>
      <view class="promotion-item-mes">
        <view v-for="(item, index) in data.prom_order" :key="index" :for-key="index">
          <view style="width:450rpx;padding-bottom:30rpx;line-height:100%;text-overflow:ellipsis;white-space: nowrap;">
            <text class="promotion-item-mes-border">{{item.name}}</text>
            <text class="prom_detail">{{item.prom_detail}}</text>
          </view>
        </view>
      </view>
    </view>

  </view>


  <view v-if="data.goods.price_ladder.length > 0" class="logistics-list pd-bg-fff">
    <view class="logistics-item-price-ladder" v-if="data.goods.price_ladder.length > 0">
    <view class="tit item-title ellipsis-1">优惠购</view>
        <view style="margin-top:2rpx;width:580rpx;overflow:hidden;">
            <view v-for="(item, index) in data.goods.price_ladder" :key="index" class="man" :for-key="index">
                <text class>{{item.amount}}件</text>
                <text class>{{item.price}}元</text>
            </view>
        </view>
    </view>
  </view>




  <view class="logistics-item" @tap="openSpecModel" style="border-top:16rpx solid #f5f5f5;padding:0 20rpx;">
    <view class="item-title">规格</view>
    <view class="item-mes" style="font-weight: bold;">{{select.specName}} {{goodsInputNum}}件</view>
    <view class="item-img">
      <image class="wh100" src="/static/images/icon-arrowdown.png"></image>
    </view>
  </view>
  <view class="logistics-list pd-bg-fff" style="border-top:16rpx solid #f5f5f5;">

    <view class="logistics-item" @tap="enterAddress" :hidden="data.goods.is_virtual">
      <view class="item-title ellipsis-1">地址</view>
      <view class="item-mes">
        <image style="width:20rpx;height:24rpx;margin-top:32rpx;margin-right:10rpx;" src="/static/images/loc.png"></image>{{address.address ? address.address:'请选择配送地址'}}</view>
      <view class="item-img">
        <image class="wh100" src="/static/images/icon-arrowdown.png"></image>
      </view>
    </view>
    <view class="logistics-item" :hidden="data.goods.is_virtual||select.activity.prom_type==4">
      <view class="item-title">运费</view>
      <view class="item-mes">{{shipping}}</view>
      <view style="height:0" class="item-img">
        <image class="wh100" src="/static/images/icon-arrowdown.png"></image>
      </view>
    </view>
    <view class="logistics-item" v-if="!data.goods.is_virtual && data.goods.exchange_integral <= 0 && select.activity.data" @tap="openPromModal">
      <view class="item-title">
        <text class="prom-item">{{select.activity.data[0].title}}</text>
      </view>
      <view class="item-mes ellipsis-1">{{select.activity.data[0].content}}</view>
      <view class="item-img">
        <image class="wh100" src="/static/images/icon-arrowdown.png"></image>
      </view>
    </view>

    <view class="logistics-item">
                    <view class="item-title">服务</view>
                    <view class="item-mes ellipsis-1">由商城自营发货并提供售后服务</view>
                    <view style="height:0" class="item-img">
                        <image class="wh100" src="/static/images/icon-arrowdown.png"></image>
                    </view>
                    <!-- <icon type="warn" size="16" color="#bbb"/> -->
                </view>
                <!-- <view class="guarantee logistics-item">
                    <view wx:if="{{!data.goods.is_virtual}}"><image class="ico-item" src="../../../images/hdfk.png"></image>{{auto_service_date}}天保修</view>
                    <view><image class="ico-item" src="../../../images/qttk.png"></image>正品保障</view>
                     <view wx:if="{{data.goods.store_free_price}}"><image class="ico-item" src="../../../images/hdfk.png"></image>满{{data.goods.store_free_price}}包邮</view>
                    
                </view> -->
    <!-- <view class="look-detail logistics-item" bindtap="tabGoodsContent">
                    <view class="co-red">查看商品详情</view>
                    <view class="item-img"><image class="wh100" src="../../../images/icon-arrowdown.png" ></image></view>
                </view> -->
  </view>
</template>


<!-- 预约商品模板 -->
<template name="ordered">
  <view class="book_label">
    <view class="book_price">
      <text class="span b">￥{{data.goods.shop_price}}</text>
      <text class="span">到店价格:<text class="i">￥{{data.goods.market_price}}</text></text>
    </view>
    <view class="book_peop">
      <view class="span">
        <view>已有
          <text class="i">{{data.goods.order_bespeak_count  + data.goods.virtual_comment_count}}</text>人预约
          <view class="em">{{data.goods.invalid_refund==1?"过期不退":"随时退"}}</view>
        </view>

      </view>
    </view>
  </view>
  <view class="book_storinf">
    <view class="book_storinf_item">
      <label>可预约时间</label>
      <text class="span">{{data.goods.bespeak_template.week_day}}</text>
    </view>
    <view class="book_storinf_item">
      <label>店内设施</label>
      <view class="book-sec-item">
        <view v-for="(item, index) in data.goods.bespeak_template.equipment_arr" :key="index" style="margin-left:15rpx;">
          {{item}}
        </view>
      </view>
    </view>
  </view>

</template>
</view>
</template>


	<script>
		
		export default {
			props: []
		}
    </script>

									